<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<%
	String path =request.getContextPath();
%>
<head>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script language="javascript" type="text/javascript" src="<%=path%>/js/validatorTool.js"></script>
	<script language="javascript" type="text/javascript" src="<%=path%>/calendar/WdatePicker.js"></script>
	
	<script language="javascript" type="text/javascript">
	
		function qrySendOrderItem(){
			var url="<%=path%>/other/goQryPageFromAdd";
			location.href = url;
		}

		function setItemValue(name,value){
			var items=document.getElementsByName(name);
			if(items!=null && items.length>0){
				for(var i=0;i<items.length;i++){
					items[i].value=value;
				}
			}
		}

		function save(){
			var sendNoticeNo=trim(document.getElementById("send_notice_no").value);
			var sendNnums= document.getElementsByName("sendNnum");
			var planArrDates= document.getElementsByName("planArrDate");
			if(sendNoticeNo==null || sendNoticeNo==""){
				alert("请输入发货通知号");
				return ;
			}
			if(sendNnums.length>0){
				for(var i=0; i<sendNnums.length;i++){
					var sendNum=trim(sendNnums[i].value);
					if(sendNum==null || sendNum==""){
						alert("第"+(i+1)+"行发货数量不能为空");
						return ;
					}		
					var planArrDate=trim(planArrDates[i].value);
					if(planArrDate==null || planArrDate==""){
						alert("第"+(i+1)+"行计划到货日期不能为空");
						return ;
					}		
				}
			}else{
				alert("请添加产品明细");
				return ;
			}
			
			form2.action="<%=path%>/other/saveMySendPlan"
			form2.submit();
			
		}
		
		function commit(){
			form2.action="<%=path%>/other/cmtMySendPlan"
			form2.submit();
		}
		
		function goback(){
			var url="<%=path%>/other/goBack2SenNoticeList"
			location.href=url;
		}
	</script>
</head>
<body class="fullbody">
            <div class="context">
                <div class="position">
                    <div class="tposi">当前位置：
                       <a href="javascript:changeMenu(1,'<%=path%>/infopub/pubmain?menuid=1');"class="linkstyle">首页</a>&nbsp;&gt;&gt;&nbsp;
                   		<a href="javascript:changeMenu(3,'');" class="linkstyle">我的订单\合同</a>&nbsp;&gt;&gt;&nbsp;
                        <span class="curposition">我的发货通知</span>
                    </div>
                    <div class="help">
						<a href="javascript:void(null);" onclick="doHelp('<%=request.getContextPath()%>/help/html/WDFHTZ.html');" class="linkstyle">帮助</a>
					</div>
                </div>
                <div class="margin8"></div>
                <div class="subpage_title">
                    <div class="title_index">
                        <img src="<%=path%>/images/common/dot03.gif" alt="" border="0" />&nbsp;我的发货通知</div>
                </div>
                <div class="subpage_bidlist">
                    <div class="subpage_search" >
                    	<form name="form1" action="<%=path%>/other/qryOrderItemInfo" method="post" >
	                        <table border="0" cellpadding="0" cellspacing="0" class="searchtable">
	                            <tr>
	                                <td valign="middle" class="w_1">发货通知号：</td>
	                                <td valign="middle" class="w_2">
	                                    <input id="send_notice_no" type="text" name="send_notice_no" value="${send_notice_no}" class="searchtext" 
	                                    	onchange="setItemValue('sendNoticeNo',this.value)"/>
	                                </td>
	                            	<td valign="middle" class="w_1">发货日期：</td>
	                                <td valign="middle" class="w_2">
	                                    <input type="text"   class="searchdate"  id="id_sendDate" name="sendDate1" value="${sendDate}"
											onclick=" return showCalendar('id_sendDate', 'y-mm-dd');"   
	                                        onblur="setItemValue('sendDate',this.value);"	readonly="readonly"  />
	                                </td>
	                            </tr>
	                            <tr>
	                            	<td valign="middle" class="w_1">运输工具：</td>
	                                <td valign="middle" class="w_2">
	                                    <input id="pkTransfer"  name="pkTransfer" type="text" value="${transferName}" class="searchtext" 
	                                    	onchange="setItemValue('transferName',this.value)"/>
	                                </td>
	                                <td valign="middle" class="w_1">车牌号：</td>
	                                <td valign="middle" class="w_2">
	                                    <input id="licenceNo" name="licenceNo"  type="text" value="${licenceNo}" class="searchtext"   
	                                    	onchange="setItemValue('licenceNo',this.value)"/>
	                                </td>
	                            </tr>
	                            <tr>
	                            	<td valign="middle" class="w_1">联系人：</td>
	                                <td valign="middle" class="w_2">
	                                    <input id="linkMan" name="linkMan" type="text" value="${linkMan}" class="searchtext"  
	                                    	onchange="setItemValue('linkMan',this.value)"/>
	                                </td>
	                                <td valign="middle" class="w_1">联系方式：</td>
	                                <td valign="middle" class="w_2" colspan="2">
	                                    <input id="linkMode" name="linkMode" type="text" value="${linkMode}" class="searchtext" 
	                                    	onchange="setItemValue('linkMode',this.value)"/>
	                                </td>
	                            </tr>
	                        </table>
	                	</form>
                    </div>
                    <div>
                    	<form name="form2"   method="post" >
	                        <table class="tableCss" cellpadding="0" cellspacing="0">
                            	<tr class="titleTr">
	                                <th width="170">订单号</th>
	                                <th width="250">产品</th>
	                                <th width="100px">数量</th>
	                                <th width="90px">计划到货日期</th>
	                                <th width="190px" class="th1">备注</th>
	                            </tr>
	                            <c:if test="${orderSubForms!=null}">
									<c:forEach items="${orderSubForms}" var="orderSubForm" varStatus="index">
										<c:if test="${orderSubForm.index%2==1}">
											<tr align="left" class="contTr-old"  >
										</c:if>
										<c:if test="${orderSubForm.index%2==0}">
											<tr align="left" class="contTr-even">
										</c:if>
											<td class="td1">
											 ${orderSubForm.orderNo}
											</td>
											<td class="td1">
												<span class="prodName">${orderSubForm.prodName}</span><br/>
												<c:if test="${orderSubForm.model!=null && ''!=orderSubForm.model}">
													规格：${orderSubForm.model} <br/>
												</c:if>
												<c:if test="${orderSubForm.type!=null && ''!=orderSubForm.type}">
													型号：${orderSubForm.type}<br/>
												</c:if>
												<c:if test="${orderSubForm.desc!=null && ''!=orderSubForm.desc}">
													描述：${orderSubForm.desc}
												</c:if>
											</td>
											<td class="td1">
												<c:if test="${orderSubForm.sendNnum!=null && ''!=orderSubForm.sendNnum}">
													${orderSubForm.sendNnum}
												</c:if>
												${orderSubForm.measureName}&nbsp;</td>
											<td class="td1"><font class="words-blue">${orderSubForm.planArrDate}</font>&nbsp;</td>
											<td class="td1">${orderSubForm.memo} &nbsp;</td>
										</tr>
									</c:forEach>
								</c:if>
	                        </table>
	                        <br/><br/>
	                        <table border="0" cellpadding="0" cellspacing="0" align="center">
	                            <tr>
	                                <td valign="middle" colspan="20" align="center">
	                                    <input type="button" class="btnscs" value="返回" onclick="goback()"/>&nbsp;&nbsp;
	                                </td>
	                            </tr>
	                        </table>
	                	</form>
                    </div>
                    <div class="margin8"></div>
                    <div class="margin8">
                    	<table align="left">
							<tr class="title">
								<td>
									<div id="message" class="msgcolor">${system_err_msg}</div>
								</td>
							</tr>
						</table>
					</div> 
                </div>
            </div>
        <div class="margin20"></div>
<!--    </div>-->
</body>
</html>
